Syntax | Description | Example |
---|---|---|
DATE(nYear, nMonth, nDay) | Creates a new date time than represents the specified date. | DATE(2008, 9, 27) Returns: 9/27/2008 12:00:00 AM |
DATETIME(nYear, nMonth, nDay[, nHour, nMinute, nSecond, nMillisecond]) | Creates a new date time than represents the specified date and optionally type. |
DATETIME(2008, 9, 27, 23, 52, 53) |
DAY(dtDateTime) | Returns the day [1:31] of a date time value. |
DAY(DATE(2008, 9, 15)) |
HOUR(dtDateTime) | Returns the hour [0:23] of a date time value. |
HOUR(DATETIME(2008, 9, 27, 23, 52, 53)) |
MILLISECOND(dtDateTime) | Returns the millisecond [0:999] of a date time value. |
MILLISECOND(DATETIME(2008, 9, 27, 23, 52, 53, 770)) |
MINUTE(dtDateTime) | Returns the minute [0:59] of a date time value. |
MINUTE(DATETIME(2008, 9, 27, 23, 52, 53)) |
MONTH(dtDateTime) | Returns the month [1:12] of a date time value. |
MONTH(DATE(2008, 9, 15)) |
NOW() | Returns the system current date time. | NOW() Returns: the current date time |
QUARTER(dtDateTime) | Returns the quarter [1:4] of a date time value. |
QUARTER(DATE(2008, 9, 15)) |
SECOND(dtDateTime) | Returns the second [0:59] of a date time value. |
SECOND(DATETIME(2008, 9, 27, 23, 52, 53)) |
TIME(nDays[, nHours, nMinutes, nSeconds, nMilliseconds]) | Creates a new time measure that represents the specified time interval. | DATE(2008, 9, 27) + TIME(1, 2, 3, 4) Returns: 9/28/2008 2:03:04 AM |
TODAY() | Returns the system current date | TODAY() Returns: the current date |
WEEKDAY(dtDateTime) | Returns the week day [0:6] of a date time value. The 0 is Sunday. |
WEEKDAY(DATE(2008, 9, 15)) |
WEEK(dtDateTime[,dtStart]) | Returns the current week, since start date in [-N:N] range. If start date is not specified it is considered to be 1st of January of the date time year (e.g measures the current week from the beginning of the year). |
WEEK(DATE(2008, 9, 15)) |
YEAR(dtDateTime) | Returns the year of a date time value. |
YEAR(DATE(2008, 9, 15)) |